home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_HDF.idb / usr / freeware / include / hdf / hcompi.h.z / hcompi.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  4.4 KB  |  112 lines

  1. /****************************************************************************
  2.  * NCSA HDF                                                                 *
  3.  * Software Development Group                                               *
  4.  * National Center for Supercomputing Applications                          *
  5.  * University of Illinois at Urbana-Champaign                               *
  6.  * 605 E. Springfield, Champaign IL 61820                                   *
  7.  *                                                                          *
  8.  * For conditions of distribution and use, see the accompanying             *
  9.  * hdf/COPYING file.                                                        *
  10.  *                                                                          *
  11.  ****************************************************************************/
  12.  
  13. /* $Id: hcompi.h,v 1.13 1995/10/25 17:51:45 koziol Exp $ */
  14.  
  15. /*-----------------------------------------------------------------------------
  16.  * File:    hcompi.h
  17.  * Purpose: Internal library header file for compression information
  18.  * Dependencies: should be included after hdf.h
  19.  * Invokes:
  20.  * Contents:
  21.  * Structure definitions:
  22.  * Constant definitions:
  23.  *---------------------------------------------------------------------------*/
  24.  
  25. /* avoid re-inclusion */
  26. #ifndef __HCOMPI_H
  27. #define __HCOMPI_H
  28.  
  29. #include "hfile.h"
  30.  
  31. /* Modeling information */
  32.  
  33. /* structure for storing modeling information */
  34. /* only allow modeling and master compression routines access */
  35.  
  36. #include "mstdio.h"     /* stdio modeling header */
  37.  
  38. typedef struct comp_model_info_tag
  39.   {
  40.       comp_model_t model_type;  /* model this stream is using */
  41.       union
  42.         {                       /* union of all the different types of model information */
  43.             comp_model_stdio_info_t stdio_info;     /* stdio model info */
  44.         }
  45.       model_info;
  46.       funclist_t  model_funcs;  /* functions to perform modeling */
  47.   }
  48. comp_model_info_t;
  49.  
  50. /* Coding information */
  51.  
  52. /* structure for storing modeling information */
  53. /* only allow encoding and master compression routines access */
  54.  
  55. #include "cnone.h"  /* no encoding header */
  56. #include "crle.h"   /* run-length encoding header */
  57. #include "cnbit.h"  /* N-bit encoding header */
  58. #include "cskphuff.h"   /* Skipping huffman encoding header */
  59. #include "cdeflate.h"   /* gzip 'deflate' encoding header */
  60.  
  61. typedef struct comp_coder_info_tag
  62.   {
  63.       comp_coder_t coder_type;  /* coding scheme this stream is using */
  64.       union
  65.         {                       /* union of all the different types of coding information */
  66.             comp_coder_none_info_t none_info;   /* "None" coding info */
  67.             comp_coder_rle_info_t rle_info;     /* RLE coding info */
  68.             comp_coder_nbit_info_t nbit_info;   /* N-bit coding info */
  69.             comp_coder_skphuff_info_t skphuff_info;     /* Skipping huffman coding info */
  70.             comp_coder_deflate_info_t deflate_info;   /* gzip 'deflate' coding info */
  71.         }
  72.       coder_info;
  73.       funclist_t  coder_funcs;  /* functions to perform encoding */
  74.   }
  75. comp_coder_info_t;
  76.  
  77. /* structure for storing a state */
  78. typedef struct comp_stateinfo_tag
  79.   {
  80.       uint32      d_offset;     /* the offset of the state in the dataset */
  81.       uint32      c_offset;     /* offset of the state in the compressed data */
  82.       comp_model_info_t minfo;  /* modeling information */
  83.       comp_coder_info_t cinfo;  /* coding information */
  84.   }
  85. comp_stateinfo_t;
  86.  
  87. /* structure for storing state caching information */
  88. typedef struct comp_state_cache_tag
  89.   {
  90.       intn        num_states;   /* the number of states cached */
  91.       comp_stateinfo_t **comp_state;    /* pointer to an array of pointers to
  92.                                            compression states */
  93.   }
  94. comp_state_cache_t;
  95.  
  96. /* compinfo_t -- compressed element information structure */
  97. typedef struct compinfo_tag
  98.   {
  99.       intn        attached;     /* number of access records attached
  100.                                    to this information structure */
  101.       int32       length;       /* the actual length of the data elt */
  102.       uint16      comp_ref;     /* compressed info ref. number */
  103.       int32       aid;          /* AID of the compressed info */
  104.       comp_model_info_t minfo;  /* modeling information */
  105.       comp_coder_info_t cinfo;  /* coding information */
  106.       intn        caching;      /* whether caching is turned on */
  107.       comp_state_cache_t sinfo; /* state information for caching */
  108.   }
  109. compinfo_t;
  110.  
  111. #endif /* __HCOMPI_H */
  112.